Hkda(x, x.group, Hstart, bw="plugin", nstage=2, pilot="samse",
pre="sphere", binned=FALSE, bgridsize)
Hkda.diag(x, x.group, bw="plugin", nstage=2, pilot="samse",
pre="sphere", binned=FALSE, bgridsize)
hkda(x, x.group, bw="plugin", nstage=2, binned=TRUE, bgridsize)kda(x, x.group, Hs, hs, y, prior.prob=NULL)
"plugin"
= plug-in, "lscv"
= LSCV,
"scv"
= SCV"amse"
= AMSE pilot bandwidths,
"samse"
= single SAMSE pilot bandwidth"scale"
= pre-scaling, "sphere"
=
pre-spheringbinned=TRUE
Hkda
and Hkda.diag
is a stacked matrix
of bandwidth matrices, one for each training data group. The result
from hkda
is a vector of bandwidths, one for each training data
group. -- The result from kda
is a vector of group labels
estimated via the kernel discriminant rule. If the test data y
are
given then these are classified. Otherwise the training data x
are classified.
bw
are "plugin", "lscv"
and
"scv"
for
Hkda
. These in turn call Hpi
,
Hlscv
and Hscv
. For plugin selectors, all
of nstage
, pilot
and pre
need to be set. For SCV
selectors, currently nstage=1
always but pilot
and pre
need to be set. For LSCV selectors, none of them are required.
Hkda.diag
makes analagous calls to diagonal selectors. For d = 1, 2, 3, 4,
and if eval.points
is not specified, then the
density estimate is computed over a grid
defined by gridsize
(if binned=FALSE
) or
by bgridsize
(if binned=TRUE
).
For d = 1, 2, 3, 4,
and if eval.points
is specified, then the
density estimate is computed exactly at eval.points
.
For d > 4, the kernel density estimate is computed exactly
and eval.points
must be specified.
For details on the pre-transformations in pre
, see
pre.sphere
and pre.scale
.
-- If you have prior probabilities then set prior.prob
to these.
Otherwise prior.prob=NULL
is the default i.e. use the sample
proportions as estimates of the prior probabilities.
Venables, W.N. & Ripley, B.D. (1997) Modern Applied Statistics with S-PLUS. Springer-Verlag. New York.
compare
,
compare.kda.cv
,
kda.kde
### See examples in ? plot.kda.kde }
<keyword>smooth</keyword>
Run the code above in your browser using DataLab